package com.gistmap.ntdc.web;

import com.gistmap.ntdc.response.Result;
import com.gistmap.ntdc.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangran
 * @date 2018/12/12
 */
@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    private ProductService productService;

    @GetMapping("/list")
    public Result list(){
        return new Result().success(productService.findAll());
    }
}
